<?php if($mode == "CATEGORY"){?>

<?php $drop = 1;?>
	
<div class="alertBox m-bot-25 bg-yellow">
	<strong class="font18"><i class="fa fa-lg fa-exclamation-triangle "></i> ALL CATEGORY</strong>
</div>

	

		<?php 
		if($category){
		foreach ($category as $category):?>

		<?php 
		$subCategory = $this->category_model->getChild($category->id,999999,FALSE);
		?>

		<div class="panel-group" id="accordion">
			<div class="panel panel-default">
				<div class="bg-yellow">
					<h4 class="panel-title">
						<a data-toggle="collapse" data-parent="#accordion"
							href="<?= '#'.$category->id; ?>"><strong class="font18"> <?= $category->name; ?>
						</strong> </a>
						
						<a class="pull-right" data-toggle="collapse" data-parent="#accordion"
							href="<?= '#'.$category->id; ?>"><i class="fa fa-caret-square-o-down"></i></a>
						
					</h4>
				</div>
				<div id="<?= $category->id; ?>" <?= ($drop < 5 ? "class='panel-collapse collapse in'" : "class='panel-collapse collapse'")?>>
					<div class="panel-body">
						<?php 
						if($subCategory){
							foreach ($subCategory as $subCat):?>
						
						<h4 class="col-lg-3 col-md-4 col-xs-12" style="padding-right:10px; padding-bottom:5px">
							<a  
								href="<?= base_url();?><?= url_title($location); ?>/<?= $subCat->slug; ?>"
								title="<?= $subCat->name; ?> in <?= location(); ?>"> + <?= $subCat->name; ?> &nbsp;
							</a>
							
							
						</h4>
						
						<?php endforeach;
						}
						?>
					</div>
				</div>
			</div>


		</div>
		<?php $drop++;?>
		<?php endforeach;
		}
		?>

	

<?php }?>


<?php if($mode == "LOCATION"){?>
<?php $drop = 1;?>

<div class="alertBox m-bot-25 bg-yellow">
	<strong class="font18"><i class="fa fa-lg fa-exclamation-triangle "></i> ALL LOCATION</strong>
</div>
	

	

		<?php 
				if($state){
				foreach ($state as $state):?>
		<?php 
		
		
		$city = $this->location_model->getLocation($state->id, $limit=99,$data=TRUE);
		?>

		<div class="panel-group" id="accordion">
			<div class="panel panel-default">
				<div class="bg-yellow">
					<h4 class="panel-title">
						<a data-toggle="collapse" data-parent="#accordion"
							href="<?= '#'.$state->id; ?>"><strong class="font18"> <?= $state->name; ?>
						</strong> </a>
						
						<a class="pull-right" data-toggle="collapse" data-parent="#accordion"
							href="<?= '#'.$state->id; ?>"><i class="fa fa-caret-square-o-down"></i></a>
							
					</h4>
				</div>
				<div id="<?= $state->id; ?>" <?= ($drop < 5 ? "class='panel-collapse collapse in'" : "class='panel-collapse collapse'")?>>
					<div class="panel-body">
						<?php 
						if($city){
							foreach ($city as $city):?>
						
						<h4 class="col-lg-3 col-md-4 col-xs-12" style="padding-right:10px; padding-bottom:5px">
							<a  
								href="<?= base_url();?><?= url_title($location); ?>/<?= $city->slug; ?>"
								title="<?= $city->name; ?> in <?= location(); ?>"> + <?= $city->name; ?> &nbsp;
							</a>
						</h4>
						
						<?php endforeach;
						}
						?>
					</div>
				</div>
			</div>


		</div>
		<?php $drop++;?>
		<?php endforeach;
		}
		?>

	


<?php }?>







